<html>
<head><title>xx</title></head>
<body>
<input type="text" onkeypress="kp()" />
<script type="text/javascript">
function kp(){
	alert(event.keyCode);
}
</script>
</body>
</html>